﻿using System;
using System.Security.Cryptography;
using System.Text;

namespace HVACWebService.Common
{
    public class Sha1
    {
        static public string Sha1Encrypt(string strSha1In)
        {
            SHA1 sha1 = new SHA1CryptoServiceProvider();
            var bytesSha1In = Encoding.Default.GetBytes(strSha1In);
            var bytesSha1Out = sha1.ComputeHash(bytesSha1In);
            var strSha1Out = BitConverter.ToString(bytesSha1Out);
            return strSha1Out.Replace("-", "").ToLower();
        }
    }
}
